﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Threading;
using System.Diagnostics;
using Microsoft.VisualBasic;
namespace Arthus
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            try
            {
                Application.SetUnhandledExceptionMode(UnhandledExceptionMode.ThrowException);
                AppDomain.CurrentDomain.UnhandledException += (s, e) =>
                {
                    Exception excep = e.ExceptionObject as Exception;
                    if (excep != null)
                    {
                        string message = "Exception:\n" + excep + "\n\n";
                        string innerexcep = "Inner Exception:\n" + excep.InnerException;
                        MessageBox.Show(message + innerexcep, "Error");
                    }
                };
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new IzlazniRacun.izlazniRacunStampanjeForma());
            }
            catch (Exception ex) { 
            MessageBox.Show("Dogodila se greška prilikom pokretanja aplikacije, molimo obratite se administratoru za dalje akcije. \n\n"+ex.ToString());
            }
            finally{
            Application.Exit();
            }
        }

        static void PrikaziSlikuPriPokretanju() {
            
        }
    }
}
